# coding:utf-8

UUNIT=[u'', u'十' , u'百' , u'千']
BUINT = [u'', u'万', u'亿', u'万亿' , u'亿亿']
NUM=[u'零',u'一',u'二', u'三', u'四', u'五' , u'六', u'七', u'八', u'九']

def conv4(num, flag=False):
   ret = u''
   s = str(num)
   l = len(s)
   assert(len(s) <= 4)
   if flag and len(s)<4:
      ret = ret + NUM[0]
   for i in xrange(l):
      if s[i] != '0':
         ret = ret + NUM[int(s[i])]+UUNIT[l-i-1]
      elif s[i-1] != '0':
         ret = ret + NUM[0]
   return ret

def conv(num):
    ss = str(num)
    l = len(ss)
    j = l / 4
    jj = l % 4
    if j==0 and jj==0:
        return num[0]
    lss = [ss[0:jj] for i in [1] if ss[0:jj]] \
       + [ss[i*4+jj:(i+1)*4+jj] for i in xrange(j) if ss[i*4+jj:(i+1)*4+jj] ]
    ul = len(lss)
    ret = u''
    zflag = False
    for i in xrange(ul):
        bu = BUINT[ul-i-1]
        tret = conv4(int(lss[i]), flag = i)
        if tret[-1:] == NUM[0]:
            tret = tret[:-1]
        if tret:
            print zflag , (tret+bu).encode('mbcs')
            if zflag and tret[0] != NUM[0] :
                ret = ret + NUM[0] +tret+bu
            else:
                ret = ret + tret+bu
            zflag = False
        else:
            zflag = True
    return ret

if __name__ == '__main__':
   #print conv(11111)
   #print conv(210003056).encode('mbcs')
   print conv(0).encode('mbcs')
   #print conv(1200999100000000010).encode('mbcs')